<?php
require_once '../init.php';

if(isset($_POST['submit'])) {
	$result=Gateway::excute('auth','AuthProxy','login');
	if($result['result']==1){
		header('Location: /test.php');
		exit;
	}else if($result['result']==0){
		$view=CoreFactory::view();
		$view->message='登录失败';
		$view->render('/auth/login');		
	}
}else{
	$view=CoreFactory::view();
	$view->render('/auth/login');
}
